Conditions | 1 |
Total Lines | 11 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | import { Controller, Inject, UseGuards, Get, Query } from '@nestjs/common'; |
||
21 | |||
22 | @Get() |
||
23 | @Roles(UserRole.PHOTOGRAPHER) |
||
24 | @ApiOperation({ summary: 'Get events by a range of dates' }) |
||
25 | public async index( |
||
26 | @Query() { fromDate, toDate }: EventPeriodDTO, |
||
27 | ): Promise<EventView> { |
||
28 | return await this.queryBus.execute( |
||
29 | new GetEventsByPeriodQuery( |
||
30 | new Date(fromDate), |
||
31 | new Date(toDate) |
||
32 | ) |
||
36 |